package org.yxing.palpalgps.adapter;

import java.util.ArrayList;

import org.yxing.palpalgps.models.ChatMessageModel;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public class ChatMessageAdapter extends BaseAdapter {
    
    private ArrayList<ChatMessageModel> data = new ArrayList<ChatMessageModel>();
    
    private Context mContext;
    
    public ChatMessageAdapter(Context context) {
        mContext = context;
    }

    public int getCount() {
        return data.size();
    }

    public ChatMessageModel getItem(int position) {
        return data.get(position);
    }

    public long getItemId(int position) {
        return position;
    }

    public View getView(int position, View convertView, ViewGroup parent) {
        return null;
    }
    
    public void add(ChatMessageModel item) {
        data.add(item);
        notifyDataSetChanged();
    }
}
